<?php get_header(); ?>
	<?php
		$sidebar = get_post_meta(1534,'page-option-sidebar-template',true);
		$sidebar_class = '';
		if( $sidebar == "left-sidebar" || $sidebar == "right-sidebar"){
			$sidebar_class = "sidebar-included " . $sidebar;
		}else if( $sidebar == "both-sidebar" ){
			$sidebar_class = "both-sidebar-included";
		}

	?>
	<div class="content-wrapper <?php echo $sidebar_class; ?>">
			
		<div class="page-wrapper">
			<?php
				// Top Slider Part
				global $gdl_top_slider_type, $gdl_top_slider_xml;
				if ($gdl_top_slider_type != "No Slider" && $gdl_top_slider_type != ''){
					echo print_item_size('element1-1',  "mt0 topslider");
						
						$slider_xml = "<Slider>" . create_xml_tag('size', 'full-width');
						$slider_xml = $slider_xml . create_xml_tag('height', get_post_meta( $post->ID, 'page-option-top-slider-height', true) );
						$slider_xml = $slider_xml . create_xml_tag('width', 960);
						$slider_xml = $slider_xml . create_xml_tag('slider-type', $gdl_top_slider_type);
						$slider_xml = $slider_xml . $gdl_top_slider_xml;
						$slider_xml = $slider_xml . "</Slider>";
						$slider_xml_dom = new DOMDocument();
						$slider_xml_dom->loadXML($slider_xml);
						print_slider_item($slider_xml_dom->documentElement);

					echo "</div>";
				}
				
				$left_sidebar = get_post_meta( $post->ID , "page-option-choose-left-sidebar", true);
				$right_sidebar = get_post_meta( 1534, "page-option-choose-right-sidebar", true);		
			
				echo "<div class='gdl-page-float-left'>";
				
				echo "<div class='gdl-page-item mid_right'>";
				
				// Page title and content
				$gdl_show_title = get_post_meta($post->ID, 'page-option-show-title', true);
				$gdl_show_content = get_post_meta($post->ID, 'page-option-show-content', true);
				if (have_posts() && $gdl_show_title != "No"){
					while (have_posts()){ the_post(); 
						echo '<div class="sixteen columns mt30">';
							if(has_post_thumbnail()):
								echo "<div class='blog-thmb'>";
									the_post_thumbnail('blog');
								echo "</div>";
							endif;
							
							echo '<div class="blog-text" ';
							if(has_post_thumbnail()) echo 'style="width:400px;"' ;
							else echo 'style="width:100%;"';
							echo '>';
								echo '<h1 style="color:#000;" class="gdl-page-title gdl-divider gdl-title title-color">';
								the_title();
								echo '</h1>';
								
								echo '<div class="clear-both" style="height:10px"></div>';
								
								echo '<div class="single-thumbnail-date">' . get_the_time('M d, Y') . '</div>';
								echo '<div class="single-thumbnail-comment">';
								comments_popup_link( __('0 Comment','gdl_front_end'),
									__('1 Comment','gdl_front_end'),
									__('% Comments','gdl_front_end'), '',
									__('Comments are off','gdl_front_end') );
								echo '</div>';
								echo '<div class="clear"></div>';
								
								$content = get_the_content();
								if( !empty($content) && $gdl_show_content != 'No' ){
									echo '<div class="gdl-page-content">';
									the_excerpt();
									echo '</div>';
								}
								echo '<a href="';
									the_permalink();
								echo '" class="blog-excerpt" style="position:inherit;">Continue Reading</a>';?>
								  <?php  $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );?>
		        <div class="cat-links" style="margin:10px 0 0;">
				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
				$show_sep = true; ?>
			</div>
					<?php
							echo '</div>';
						echo '</div>';
					}
				}else{
					while (have_posts()){ the_post(); 
						$content = get_the_content();
						if( !empty($content) && $gdl_show_content != 'No' ){
							echo '<div class="sixteen columns mt0">';
							echo '<div class="gdl-page-content">';
							the_content();
							echo '</div>';
							echo '</div>';
						}			
					}
				}?>
              
			
			<?php	echo "</div>"; // end of gdl-page-item?>
				
				<div class="five columns mt0 gdl-left-sidebar"><div class="left-sidebar-wrapper gdl-divider" style="">
        <?php if(dynamic_sidebar("right")){}?>
		</div></div>
        <?php
				//get_sidebar('right');		
				
				echo "</div>"; // gdl-page-float-left	
				
				
			?>
			
			<div class="sixteen columns "><div class="divider"><div class="scroll-top">Back To Top</div></div></div>
			
			
		
			<br class="clear">
			
		</div>
	</div> <!-- content-wrapper -->
	
<?php get_footer(); ?>